@mixin min-max-width($width) {
  width: $width;
  min-width: $width;
  max-width: $width;
}

.navigation-header {
  .logo-image {
    display: block;
    width: 48px;
    min-width: 48px;
    height: 48px;
    line-height: 48px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: #FFF;
    border-radius: 5px;
    margin-left: 5px;
  }

  .logo-text {
    color: #FFF;
    font-size: 14px;
    margin-left: 5px;
  }
}

/*
md-toolbar.md-default-theme:not(.md-menu-toolbar), md-toolbar:not(.md-menu-toolbar) {
  background-color: rgba(255,255,255,.05);
}
*/

md-sidenav {
  @include min-max-width($sidenavWidth);
  background-color: $bgColor;
}

.md-sidenav-min {
  @include min-max-width($sidenavMinWidth);
}

.md-sidenav-min span{
  font-size: 0;
  opacity: 0;
}

.md-sidenav-min .sidenav-list h4 {
  font-size: 0;
  padding: 0;
  margin: 0;
}

md-sidenav, .sidenav-list md-list-item.subheader::before, md-list-item::before, .sidenav-list h4, .sidenav-list md-list-item.subheader, .sidenav-list hr, .sidenav-list span {
  transition: .40s all;
	-moz-transition: .40s all;
	-webkit-transition: .40s all;
	-o-transition: .40s all;
}


.md-sidenav-min .sidenav-list md-list-item.subheader {
  min-height: 0;
}

.md-sidenav-min md-list-item.subheader::before {
  min-height: 0;
}

.md-sidenav-min .sidenav-list hr {
  border-top: 1px solid #eee;
}

.sidenav-list hr {
  border-top: #28444F;
}

md-sidenav.md-sidenav-theme {
  background-color: $bgColor;
}

md-sidenav:not(._md-locked-open) {
  box-shadow: 0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12);
}

.sidenav-list-button {
  width: 100%;
  text-align: left;
  margin: 0px;
  text-transform: none;
}

.sidenav-user-contents {
  height: $sidenavHeaderHeight;
  white-space: nowrap;

  img {
    padding-top: 3px;
    padding-left: 3px;
    border-radius: 40px;
    height: $sidenavHeaderHeight;
    max-width: 45px;
    max-height: 45px;
    vertical-align: middle;
  }
}

#sidenav-user-name {
  color: $fontColor;

  & ng-md-icon {
    fill: $fontColor;
  }
}

.sidenav-list {
  overflow-y: auto;
  overflow-x: hidden;

  height: calc(100vh - #{$sidenavHeaderHeight});
  padding: 0;

  & md-list-item {
    min-height: 40px;
    padding: 0;
    width: 200px;
  }

  ng-md-icon {
    fill: $fontColor;
  }

  a {
    color: $fontColor;
    text-decoration: none;
    width: 100%;
    padding: 0 0 8px $sidenavItemLeftWidth;

    &:hover, &.sidenav-active {
      font-weight: bold;
      background-color: #1C1C25;
    }

    &.sidenav-active {
      border-left: $sidenavItemBorderSize solid $fontColor;
      padding-left: calc(#{$sidenavItemLeftWidth} - #{$sidenavItemBorderSize});
      padding-top: 3px;
    }
  }

  h4 {
    text-transform: uppercase;
    color: #fdfdfd;
    font-weight: 400;
    letter-spacing: .5px;
    padding: 15px $sidenavItemLeftWidth/2 8px;
    white-space: nowrap;
    overflow: hidden;
    overflow-x: hidden;
    text-overflow: ellipsis;
  }

  hr {
    background-color: white;
    width: 90%;
  }

  span {
    margin-left: 4px;
  }
}

.sidenav-footer {
  padding: 0;

  ng-md-icon {
    fill: $fontColor;
  }

  a {
    color: $fontColor;
    text-decoration: none;
  }

  hr {
    width: 90%;
  }

  .md-button.sidenav-toggle {
    bottom: 20px;
    position: absolute;
    right: -15px;
    width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    line-height: 18px !important;
    background-color: $bgColor;
  }

  .md-button.sidenav-toggle:hover, .md-button.sidenav-toggle:focus {
    background-color: $bgColor;
  }

  ng-md-icon.sidenav-toggle-icon {
    top: 1px;
    right: 4px;
    font-weight: bold;
  }

  md-list-item:last-child {
    margin-top: -100px;
  }
}

.gravitee-sidenav {
  background-color: $bgColor;
  padding-top: 54px;
  z-index: 1;
}
